cmake_minimum_required(VERSION 3.10)

project(Serial)

set(CMAKE_CXX_STANDARD 11)

add_library(crtSerialLib SHARED crtSerial.cpp crtSerial_C.c)

target_include_directories(crtSerialLib
    PRIVATE
    ${CMAKE_SOURCE_DIR}
)


install(TARGETS crtSerialLib
    LIBRARY DESTINATION /usr/local/lib       
    ARCHIVE DESTINATION /usr/local/lib      
    RUNTIME DESTINATION /usr/local/bin    
)

install(DIRECTORY ${CMAKE_SOURCE_DIR}/
    DESTINATION /usr/local/include         
    FILES_MATCHING PATTERN "*.h" 
)

